package room

import (
	"gorm.io/plugin/soft_delete"
	"xkginweb/global"
)

type QccRoom struct {
	RoomId    uint                  `json:"room_id" gorm:"primarykey;comment:主键ID"` // 主键ID
	CreatedAt global.LocalTime      `gorm:"type:datetime(0);autoCreateTime;comment:创建时间" json:"createdAt"`
	UpdatedAt global.LocalTime      `gorm:"type:datetime(0);autoUpdateTime;comment:更新时间" json:"updatedAt"`
	IsDeleted soft_delete.DeletedAt `gorm:"softDelete:flag,DeletedAtField:DeletedAt;default:0" json:"isDeleted" structs:"is_deleted"`
	RoomName  string                `json:"room_name" gorm:"not null;default:'';comment:房间名"`
	RoomType  int8                  `json:"room_type" gorm:"not null;default:0;comment:房间类型 1进线房 2机房"`
}

func (QccRoom) TableName() string {
	return "qcc_room"
}
